<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>fullCalendar2Java</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/fullcalendar2.css">
<link rel="stylesheet" type="text/css" href="css/fancybox.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<script src='js/jquery-1.11.1.js'></script>
<script src='js/jquery-ui.js'></script>
<script src='js/fullcalendar.min.js'></script>
<script src='js/jquery.fancybox-1.3.1.pack.js'></script>

<script src='js/fullcalendar.js'></script>

<!--
	说明：需要整合农历节气和节日，引入fullcalendar.js fullcalendar2.css
	不需要则引入：fullcalendar.min.js fullcalendar.css
-->

<script type="text/javascript">
$(function() {
	//页面加载完初始化日历 
	$('#calendar').fullCalendar({
		//设置日历头部信息
		header: {
			left: 'prev,next today',
			center: 'title',
			right: 'month,agendaWeek,agendaDay'
		},
		slotEventOverlap:true,
		weekMode: {fixed: 5},//设置一个月显示五周
		height:650,//设置高度
	    width:500,//设置宽度
		eventLimit: true, // 多个事件时进行折叠
		weekNumbers:true,//是否显示日历的第几周，默认为false
		firstDay:1,//每行第一天为周一 
        editable: false,//启用拖动 
		events:'../../yz1/JsonAction',
		//events: 'json/events.json' ,  //读取指定位置的接送串	
		//events:'../../JsonServlet.servlet',	
		//点击某一天时触发
		dayClick: function(date, allDay, jsEvent, view) {
			$(this).css({color: "red", background: "#DCE6F4" });
			var selDate =$.fullCalendar.formatDate(date,'yyyy-MM-dd');
			$.fancybox({
				'type':'ajax',
				'href':'CalendarAdd.jsp?date='+selDate.toString()
			});
    	},
		//单击事件项时触发 
        eventClick: function(calEvent, jsEvent, view) { 
            $.fancybox({ 
                'type':'ajax', 
                'href':'../../yz/CalendarActionupdateone?id='+calEvent.id
            }); 
        }
		
	}); 
});
</script>
</head>

<body>
<div id="main" style="width:1060px;height:830px;">
   <h2 class="top_title"><a></a></h2>
   <div id='calendar'></div>
</div>
<!-- <p id="stat"><script type="text/javascript" src="/js/tongji.js"></script></p> -->
</body>
</html>